package com.lambda;

import java.util.ArrayList;
import java.util.List;

/**
 * @Auther: zch
 * @Date: 2019/1/10 09:59
 * @Description:
 */
public class InstanceMethodRef {

    public static void main(String[] args) throws InterruptedException {

        List<User> users = new ArrayList<User>();

        for (int i=1;i<10; i++) {
            users.add(new User("name"+i));
        }
        users.stream().map(User::getName).forEach(System.out::println);

    }

}
